import React from 'react'
import ReactDOM from 'react-dom/client'
import { RouterProvider, createBrowserRouter } from 'react-router-dom'
import { Provider as StoreProvider } from 'react-redux'
import { App } from 'antd'
import { routes } from './router'
import store from './store'

import './index.css'
import 'normalize.css'

const router = createBrowserRouter(routes)

ReactDOM.createRoot(document.getElementById('root')!).render(
  <React.StrictMode>
    <StoreProvider store={store}>
      <App message={{ maxCount: 1 }}>
        <RouterProvider router={router} />
      </App>
    </StoreProvider>
  </React.StrictMode>,
)
